package com.hzdesk.media.koreabatchmatvector.logic.model;

import android.content.Context;

import com.hzdesk.media.koreabatchmatvector.bean.MouseUserDevicesinfoBean;
import com.hzdesk.media.koreabatchmatvector.dao.MouseUserDevicesinfoDaoUtils;
import com.hzdesk.media.koreabatchmatvector.logic.contract.ChangeMouseSetCotract;

import java.util.List;

/**
 * Created by Administrator on 2018/7/17.
 * 杭州席媒科技有限公司  Developers  刘传华  10
 * 佛祖镇楼 bug辟易
 */

public class ChangeMouseSetModle implements ChangeMouseSetCotract.IChangeMouseSetModle {
    @Override
    public List<MouseUserDevicesinfoBean> query(Context mContext) {
        MouseUserDevicesinfoDaoUtils mouseUserDevicesinfoDaoUtils =   new MouseUserDevicesinfoDaoUtils(mContext);
        List<MouseUserDevicesinfoBean> bean = mouseUserDevicesinfoDaoUtils.queryAll();
        return bean;
    }

    @Override
    public boolean update(MouseUserDevicesinfoBean bean, Context mContext) {
        boolean flag = false;
        MouseUserDevicesinfoDaoUtils mouseUserDevicesinfoDaoUtils =   new MouseUserDevicesinfoDaoUtils(mContext);
        flag =  mouseUserDevicesinfoDaoUtils.update(bean);
        return flag;
    }
}
